<?php
// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.

return CMap::mergeArray(
	array(
		'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
		'name'=>'Tvoy gorod',

		// preloading 'log' component
		'preload'=>array('log'),

		// autoloading model and component classes
		'import'=>array(
			'application.models.*',
			'application.components.*',
			'application.extensions.yii-mail.*',
			'ext.giix-components.*', // giix components	
            'application.modules.user.UserModule'
		),
        'sourceLanguage'    =>'ru',//en
        'language'          =>'ru',

		'modules'=>array(
			// uncomment the following to enable the Gii tool
			'gii'=>array(
				'class'=>'system.gii.GiiModule',
				'generatorPaths' => array(
					'ext.giix-core', // giix generators
				),			
			),

            'admin' => array(),
            'user' => array(
                'profileUrl' => '/user/profile',
            ),
		),

		// application components
		'components'=>array(
			'user'=>array(
				// enable cookie-based authentication
				'allowAutoLogin'=>true,
                'loginUrl'=>array('home/login'),
			),
		    'mail' => array(
		        'class' => 'application.extensions.yii-mail.YiiMail',
		    ),
            'curl' => array(
                'class' => 'application.extensions.curl-master.Curl',
                //'options' => array(),
            ),            
            'basestatic' => array('class' => 'application.components.BaseStatic'),
			'image'=>array(
	            'class'=>'application.extensions.image.CImageComponent',
	            // GD or ImageMagick
	            'driver'=>'GD',
	            // ImageMagick setup path
	            //'params'=>array('directory'=>'D:/Program Files/ImageMagick-6.4.8-Q16'),
	        ),
			// uncomment the following to enable URLs in path-format
            
			'urlManager'=>array(
            /*
				'urlFormat'=>'path',
	        	'showScriptName' => false,
	        	'urlSuffix' => '.html',
		    	//'caseSensitive'=>false,
		    	'rules'=>array(
	        		'<module>/<controller:\w+>/list'=>'<module>/<controller>/admin',
	        		'about_us'=>'about/index',
	        		'privacy_policy'=>'privacy/index',
	        		'articles'=>'supporting/index',
	        		'article/<id:\d+>'=>'article/index',
	        		'article/print/<id:\d+>'=>'article/print',
	        		'products'=>'products/index',
	        		'product/<product_id:\d+>'=>'products/redirect',
	        		'assessment' => 'assessment/index',
	        		'results' => 'results/index',
	        		'pledge' => 'pledge/index',
	        		'detail_email' => 'pledge/detailemail',
                    'sitemap.xml'=>'home/sitemapxml',
                    'sitemap'=>'home/sitemap',
				),		    	
			/*
		    'rules'=>array(
					'<controller:\w+>/<id:\d+>'=>'<controller>/view',
					'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
					'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
				),
			*/
			),
		    'db'=>array(
				'connectionString' => 'mysql:host=localhost;dbname=testdrive',
				'emulatePrepare' => true,
				'username' => 'root',
				'password' => '',
				'charset' => 'utf8',
			),
			'errorHandler'=>array(
				// use 'site/error' action to display errors
				'errorAction'=>'home/error',
			),
			'log'=>array(
			    'class'=>'CLogRouter',
			),			
		),
		
		// application-level parameters that can be accessed
		// using Yii::app()->params['paramName']
		'params'=>array(
      'systemEmail' => 'kshumdev@gmail.com',
      'adminEmail'=>'konstantin.shum@gmail.com',
      'geocoder_key' => '',

      'default_free_firm_tmpl_ids' => array(4), //maybe not array but int? 

      'default_country_id' => 1,
      'default_region_id' => 1,
      'default_rubric_id' => 1,

      'list_firms_perpage'=> 1,

      'log_path_actions' => '/logs/actions/',

      'firms_img_orig' => '/uploads/firms/img/orig/',
      'firms_img_big' => '/uploads/firms/img/big/',
      'firms_img_mid' => '/uploads/firms/img/mid/',
      'firms_img_thumb' => '/uploads/firms/img/thumb/',
      'firms_img_logo' => '/uploads/firms/img/logo/',
			'firms_logo_h' => 80,
			'firms_logo_w' => 120,
			'firms_thumb_h' => 80,
			'firms_thumb_w' => 100,
			'firms_mid_h' => 480,
			'firms_mid_w' => 640,
			'firms_big_h' => 768,
			'firms_big_w' => 1024,
		),
        'defaultController' => 'home',
        'layout' => '//layouts/base'
	),
    require_once(dirname(__FILE__).'/local.php')
);